home *** CD-ROM | disk | FTP | other *** search
- package asciiShop;
-
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
-
- public class asciiLibs {
- char[][] editChar;
- // $FF: renamed from: i int
- int field_0;
- // $FF: renamed from: j int
- int field_1;
- int countForVars;
- String[] artBuffer;
- int count;
- String spaceCount = new String("");
-
- asciiLibs(String[] var1) {
- this.artBuffer = var1;
- }
-
- public void invert(int var1) {
- this.editChar = new char[200][200];
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- this.editChar[this.field_0][this.field_1] = this.artBuffer[this.field_0].charAt(this.field_1);
- }
- }
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- System.out.print(this.editChar[this.field_0][this.field_1]);
- ++this.count;
- }
-
- System.out.println();
- }
-
- System.out.println(this.count + " " + 1105);
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '/') {
- this.editChar[this.field_0][this.field_1] = '\\';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '\\') {
- this.editChar[this.field_0][this.field_1] = '/';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '(') {
- this.editChar[this.field_0][this.field_1] = ')';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == ')') {
- this.editChar[this.field_0][this.field_1] = '(';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == ']') {
- this.editChar[this.field_0][this.field_1] = '[';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '[') {
- this.editChar[this.field_0][this.field_1] = ']';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '{') {
- this.editChar[this.field_0][this.field_1] = '}';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '}') {
- this.editChar[this.field_0][this.field_1] = '{';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '<') {
- this.editChar[this.field_0][this.field_1] = '>';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '>') {
- this.editChar[this.field_0][this.field_1] = '<';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '3') {
- this.editChar[this.field_0][this.field_1] = 'E';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'E') {
- this.editChar[this.field_0][this.field_1] = '3';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'b') {
- this.editChar[this.field_0][this.field_1] = 'd';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'd') {
- this.editChar[this.field_0][this.field_1] = 'b';
- }
- }
- }
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- System.out.print(this.editChar[this.field_0][this.field_1]);
- ++this.count;
- }
- }
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- StringBuffer var2 = new StringBuffer(this.artBuffer[this.field_0].length());
-
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- var2.append(this.editChar[this.field_0][this.field_1]);
- }
-
- this.artBuffer[this.field_0] = var2.toString();
- }
-
- }
-
- public void invertVert(int var1) {
- this.editChar = new char[200][200];
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- this.editChar[this.field_0][this.field_1] = this.artBuffer[this.field_0].charAt(this.field_1);
- }
- }
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- System.out.print(this.editChar[this.field_0][this.field_1]);
- ++this.count;
- }
-
- System.out.println();
- }
-
- System.out.println(this.count + " " + 1105);
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '/') {
- this.editChar[this.field_0][this.field_1] = '\\';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '\\') {
- this.editChar[this.field_0][this.field_1] = '/';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'Z') {
- this.editChar[this.field_0][this.field_1] = 'S';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'S') {
- this.editChar[this.field_0][this.field_1] = 'Z';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'p') {
- this.editChar[this.field_0][this.field_1] = 'b';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'b') {
- this.editChar[this.field_0][this.field_1] = 'p';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'q') {
- this.editChar[this.field_0][this.field_1] = 'd';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'v') {
- this.editChar[this.field_0][this.field_1] = '^';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '^') {
- this.editChar[this.field_0][this.field_1] = 'v';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'd') {
- this.editChar[this.field_0][this.field_1] = 'q';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'm') {
- this.editChar[this.field_0][this.field_1] = 'w';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'w') {
- this.editChar[this.field_0][this.field_1] = 'm';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'M') {
- this.editChar[this.field_0][this.field_1] = 'W';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'n') {
- this.editChar[this.field_0][this.field_1] = 'u';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'u') {
- this.editChar[this.field_0][this.field_1] = 'n';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == 'J') {
- this.editChar[this.field_0][this.field_1] = '7';
- }
-
- if (this.artBuffer[this.field_0].charAt(this.field_1) == '7') {
- this.editChar[this.field_0][this.field_1] = 'J';
- }
- }
- }
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- System.out.print(this.editChar[this.field_0][this.field_1]);
- ++this.count;
- }
- }
-
- for(this.field_0 = 0; this.field_0 < var1; ++this.field_0) {
- StringBuffer var2 = new StringBuffer(this.artBuffer[this.field_0].length());
-
- for(this.field_1 = 0; this.field_1 < this.artBuffer[this.field_0].length(); ++this.field_1) {
- var2.append(this.editChar[this.field_0][this.field_1]);
- }
-
- this.artBuffer[this.field_0] = var2.toString();
- }
-
- }
-
- public void horizontalLine(int var1) {
- new String("");
- BufferedReader var3 = new BufferedReader(new InputStreamReader(System.in));
-
- try {
- System.out.println("Which line(number) do you wish to change to a line?: ");
- int var4 = Integer.parseInt(var3.readLine());
- System.out.println("What character(number) would you like to start the conversion from?: ");
- int var5 = Integer.parseInt(var3.readLine());
- System.out.println("What character would you like to end the line at?: ");
- int var6 = Integer.parseInt(var3.readLine());
- char[] var7 = new char[this.artBuffer[var4].length()];
-
- for(int var9 = 0; var9 < this.artBuffer[var4].length(); ++var9) {
- var7[var9] = '-';
- }
-
- this.artBuffer[var4] = new String(var7);
- } catch (IOException var10) {
- System.out.println("Bad stuff has occured -2");
- }
-
- }
-
- public void replaceChar(int var1) throws IOException {
- boolean var3 = true;
- boolean var4 = true;
- BufferedReader var5 = new BufferedReader(new InputStreamReader(System.in));
- System.out.println("What character would you like to replace: ");
- char var6 = var5.readLine().charAt(0);
- System.out.println("Wha character would you like to replace it with: ");
- char var7 = var5.readLine().charAt(0);
-
- for(int var9 = 0; var9 < var1; ++var9) {
- char[] var8 = this.artBuffer[var9].toCharArray();
-
- for(this.field_1 = 0; this.field_1 < var8.length; ++this.field_1) {
- if (var8[this.field_1] == var6) {
- var8[this.field_1] = var7;
- }
- }
-
- this.artBuffer[var9] = new String(var8);
- }
-
- }
- }
-